function afterSubmit(type){
    /*
     * Submit the dealer as well to trigger the xml-sync user event.
     */
    var contract = nlapiLoadRecord('salesorder', nlapiGetRecordId());
    var dealer = nlapiLoadRecord('customer', contract.getFieldValue('entity'));
		var dealerId = dealer.getFieldValue('entityid');
		nlapiLogExecution('debug', 'Dealer ID: ' + dealerId, 'Triggering customer user event');
    nlapiSubmitRecord(dealer);
}
